package com.jiangjiang.eshop.inventory.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @Author Jianghaowen
 * @Date 2021/6/7
 * @Description: TODO
 * @Version V1.0
 **/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("inventory_goods_stock")
public class GoodsStockEntity {
    /**
     * 主键
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    /**
     * 商品sku id
     */
    @TableField("goods_sku_id")
    private Long goodsSkuId;
    /**
     * 销售库存
     */
    @TableField("sale_stock_quantity")
    private Long saleStockQuantity;
    /**
     * 锁定库存
     */
    @TableField("locked_stock_quantity")
    private Long lockedStockQuantity;
    /**
     * 已销售库存
     */
    @TableField("saled_stock_quantity")
    private Long saledStockQuantity;
    /**
     * 库存状态：0：无库存，1：有库存
     */
    @TableField("stock_status")
    private Integer stockStatus;
    /**
     * 创建时间
     */
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date gmtCreate;
    /**
     * 修改时间
     */
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date gmtModified;

}
